local totalNum = redis.call('get',tostring(KEYS[1]))
totalNum=tonumber(totalNum)
if totalNum   <  tonumber(ARGV[1]) then
   return 0
end

redis.call('decrBy',tostring(KEYS[1]),tonumber(ARGV[1]))
--[[  
     rpush oderInfo productId_NUM_userID 
     redis.call('rpush',tostring(KEYS[2]),tostring(ARGV[2])..'_'..tostring(ARGV[1])..'_'..tostring(ARGV[3]))
--]]  

return 1